#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;
typedef long long ll;
int main() {
	double a,b;
	while (cin>>a>>b) {
		if (a>b) swap(a,b);
		double res=0;
		if (3*a<=b && a>res) res=a;
		if (b<=3*a && b/3>res) res=b/3; 
		if (a/2>res) res=a/2;
		printf("%0.6llf\n", res);
	}
	return 0;
}
